<?php
namespace App\Events;

class Auth extends \Library\Mvc\Event
{
	const LOGGED_IN = 'logged_in';
	const NOT_LOGGED_IN = 'not_logged_in';
	const SESSION_EXPIRED = 'session_expired';
	
	public function isLoggedIn()
	{
		return $this->state == self::LOGGED_IN;
	}
	
	public function login($user, $pass)
	{
		if (1==1)
		{
			$this->changeState(self::LOGGED_IN);
		}
		else 
		{
			$this->changeState(self::NOT_LOGGED_IN);	
		}
	}
}